@model PostModel

@inject IStringLocalizer<Resource> _localizer

<nav class="post-nav">
  <div class="d-none d-md-flex align-items-md-center">
    @if (Model.PostSlug.Older != null)
    {
      <div class="col">
        <a class="post-nav-item text-start" href="~/post/@Model.PostSlug.Older.Slug" aria-label="@_localizer["previous-post"]">
          <span class="post-nav-text">@_localizer["previous-post"]</span>
          <h4 class="post-nav-title">@Model.PostSlug.Older.Title</h4>
        </a>
      </div>
    }
    @if (Model.PostSlug.Newer != null)
    {
      <div class="col">
        <a class="post-nav-item text-end" href="~/post/@Model.PostSlug.Newer.Slug" aria-label="@_localizer["next-post"]">
          <span class="post-nav-text">@_localizer["next-post"]</span>
          <h4 class="post-nav-title">@Model.PostSlug.Newer.Title</h4>
        </a>
      </div>
    }
  </div>
</nav>
